package net.wangds.config.module;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.SuperBuilder;
import net.wangds.data.impl.IdCreate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;

/**
 * .
 * <p></p>
 *
 * @author 王东石 2021/2/25 1:47.
 */
@Table(name="sys_dict", indexes = {
        @Index(unique = true, columnList = "cata, item")
})
@Entity
@NoArgsConstructor(force = true)
@AllArgsConstructor
@Getter
@Setter
@SuperBuilder
public class Dict extends IdCreate {
    /**
     * 分类.
     */
    @Column(length=64)
    private String cata;

    /**
     * key.
     */
    @Column(length=128)
    private String item;

    /**
     * 配置值.
     */
    @Column(length=1000)
    private String text;


    /**
     * 父项Key.
     */
    @Column(length=128)
    private String parentItem;

    /**
     * 父项配置值.
     */
    @Column(length=1000)
    private String parentText;

    @Column()
    private int version;

    @Column(length=2000)
    private String description;
}
